import React, { Component } from 'react';
import { observer, inject } from 'mobx-react';
import { HashRouter as Router, Route, Switch } from 'react-router-dom';
import ErrorBoundary from '@/components/ErrorBoundary';
import styles from './index.scss';
import Login from '../Login';
import Home from '../Home';

@inject('AppStore')
@observer
class App extends Component {
  constructor(props, context) {
   // super(props, context);
   console.log('dev2');
    this.AppStore = this.props.AppStore;
    this.state = {};
  }

  componentDidMount() {}

  componentWillUnmount() {}

  render() {
    return (
      <div className={styles['app-container']}>
        <ErrorBoundary>
          <Router>
            <Switch>
              <Route path="/login" exact component={Login} />
              <Route path="/" component={Home} />
            </Switch>
          </Router>
        </ErrorBoundary>
      </div>
    );
  }
}

export default App;
